import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue'),
    meta: {
      title: '未来媒体实验室'
    }
  },
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/manage',
    name: 'Manage',
    component: () => import('../views/ManagePage.vue'),
    children: [
      {
        path: '/home',
        name: 'HomeView',
        component: () => import('../views/HomeView.vue')
      },
      {
        path: '/team',
        name: 'EmployeeView',
        component: () => import('../views/TeamView.vue'),
        meta: {
          title: '加入我们'
        }
      },
      {
        path: '/project',
        name: 'CompanyView',
        component: () => import('../views/ProjectView.vue'),
        meta: {
          title: '项目介绍'
        }
      },
      {
        path: '/news',
        name: 'TaskView',
        component: () => import('../views/NewsView.vue'),
        meta: {
          title: '新闻动态'
        }
      },
      {
        path: '/index',
        name: 'StatisticView',
        component: () => import('../views/IndexView.vue'),
        meta: {
          title: '首页管理'
        }
      },
      {
        path: '/work',
        name: 'WorkView',
        component: () => import('../views/WorkView.vue'),
        meta: {
          title: '工作台'
        }
      },
      {
        path: '/join',
        name: 'WorkView',
        component: () => import('../views/JoinView.vue'),
        meta: {
          title: '加入我们'
        }
      },
      {
        path: '/admin',
        name: 'AdminView',
        component: () => import('../views/AdminView.vue'),
        meta: {
          title: '管理员'
        }
      },
    ]
  }
]; 


const router = new VueRouter({
  routes
})

export default router
